package io;

import java.io.*;

public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream ins = new FileInputStream("person2.obj");
        ObjectInputStream ois = new ObjectInputStream(ins);
        Person person1 = (Person) ois.readObject();
        System.out.println(person1);
        ois.close();
    }
}
